package cn.stylefeng.guns.modular.api;

import cn.stylefeng.guns.modular.business.service.CAdviceFeedbackService;
import cn.stylefeng.roses.core.base.controller.BaseController;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by pzp on 2019/7/24.
 */
@RestController
@RequestMapping("/gunsApi/adviceFeedback")
public class AdviceFeedbackApi extends BaseController{

    @Autowired
    private CAdviceFeedbackService cAdviceFeedbackService;

    @ApiOperation("新增意见反馈")
    @PostMapping("/add")
    public ResponseData add(@RequestParam Long userId, @RequestParam String email,@RequestParam String content,String picture){
        return ResponseData.success(cAdviceFeedbackService.add(userId, email, content, picture));
    }
}
